import request from '@/utils/request'

// 查询房型设置列表
export function listRoomType(query) {
  return request({
    url: '/residing/roomType/list',
    method: 'get',
    params: query
  })
}

// 查询启动房型列表
export function listRoomTypeEnabled(query) {
  return request({
    url: '/residing/roomType/listEnabled',
    method: 'get',
    params: query
  })
}

// 查询房型设置详细
export function getRoomType(id) {
  return request({
    url: '/residing/roomType/' + id,
    method: 'get'
  })
}

// 新增房型设置
export function addRoomType(data) {
  return request({
    url: '/residing/roomType',
    method: 'post',
    data: data
  })
}

// 修改房型设置
export function updateRoomType(data) {
  return request({
    url: '/residing/roomType',
    method: 'put',
    data: data
  })
}

// 删除房型设置
export function delRoomType(id) {
  return request({
    url: '/residing/roomType/' + id,
    method: 'delete'
  })
}

//修改房型状态
export function updateRoomStatus(id,status){
	return request({
	  url: '/residing/roomType/updateStatus',
	  method: 'put',
	  data: { id,status }
	})
}
